# -*- coding:utf-8 -*-
# Author: Bernard
# Date: 2021-7-14

stuTuples = [(20162670, '张三', 89), 
             (20162671, '李四', 89), 
             (20162672, '王五', 90)]
res = sorted(stuTuples, key=lambda stu: stu[2], reverse=True)
print('学号\t\t姓名\t成绩\t名次')
for i in range(len(res)):
    for j in res[i]:
        print(j, end='\t')
    print(i+1)